{include /common/header}
<div class="row">
	<div class="col-sm-5 col-md-3 col-lg-3">
		{include side}
	</div>
	<div class="col-sm-7 col-md-9 col-lg-9">
		<div class="row">
		{php}
			$_channels = \Channel::get();
		{/php}
		{foreach $_channels as $v}
			{if $v['pid'] == $channel['id'] && $v['status']==1}
			<div class="col-md-6 col-lg-6">
				<div class="panel panel-default">
					<div class="panel-heading">
						<a href="{:url('/home/content/index',['id'=>$v['id']])}">{$v.title}</a>
					</div>
					{if $v['pid'] == $channel['id'] && $v['status']==1}
					{php}
						// 获取内容
						$_contents = \Ebcms::db() -> select('content', '*', ['status'=>1,'channel_id'=>$v['id'],'ORDER'=>['id'=>'DESC'],'LIMIT'=>10]);
					{/php}
					<ul class="list-group">
						{foreach $_contents as $vo}
						<li class="list-group-item"><span style="color: #444;">•</span>&nbsp;<a href="{:content_url($vo)}">{$vo.title?:'暂无标题'}</a></li>
						{/foreach}
					</ul>
					{/if}
				</div>
			</div>
			{/if}
		{/foreach}
		</div>
	</div>
</div>
{include /common/footer}